<?php
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

?>
<?php $expressions = []; foreach ( $this->main as $item ): ?>
    <?php $expressions[] = '!$state.is(\'' . $item['id'] . '\')';
    ?>
<?php endforeach; ?>
<?php
    $expressions[] = '!$state.is(\'\')';
    $expressions[] = !$this->isInstaller ? 'true' : 'false';
?>

<div class="menu-wrapper"
    ng-show="<?php echo implode( '&&', $expressions); ?>"
    >
<nav class="admin__menu" ng-controller="mainController">
    <span
        class="logo logo-static"
        data-edition="Community Edition">
        <img class="logo-img"
             src="./pub/images/logo.svg"
             alt="Magento Admin Panel">
    </span>
    <ul id="nav" role="menubar">
        <li class="item-home level-0" ng-class="{_active: $state.current.name === 'root.home'}">
            <a href="" ui-sref="root.home">
                <span>Home</span>
            </a>
        </li>
        <li class="item-extension level-0"  ng-class="{_active: $state.current.type === 'extension'
            || ['install', 'uninstall', 'update'].indexOf($state.current.type) !== -1}">
            <a href="" ui-sref="root.extension-auth">
                <span>Extension Manager</span>
            </a>
        </li>
        <li class="item-component level-0"   ng-class="{_active: $state.current.type === 'module'}">
            <a href="" ui-sref="root.module">
                <span>Module Manager</span>
            </a>
        </li>
        <li class="item-upgrade level-0" ng-class="{_active: $state.current.type === 'upgrade'}">
            <a href="" ui-sref="root.upgrade">
                <span>System Upgrade</span>
            </a>
        </li>
        <li class="item-system-config level-0" ng-class="{_active: state.current.name === 'root.system-config'}">
            <a href="" ui-sref="root.system-config">
                <span>System Config</span>
            </a>
        </li>
    </ul>
</nav>
</div>
